package com.jiexin.param;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;

/**
 * @Author: Jay_Liu
 * @Description:
 * @Date: Created in 19:46 2018/4/3 0003
 * @Modified By:
 */
@Getter
@Setter
@ToString

public class DeptParam {

    private Integer id;

    @NotBlank(message = "部门名称不能为空")
    @Length(max = 15, min = 2, message = "部门名称需要2到15个字之间")
    private String name;

    //保证传输到数据库时不为空,parentId =0 为最上层部门菜单
    private Integer parentId = 0;

    @NotNull(message = "展示顺序不可以为空")
    private Integer seq;

    @Length(max = 150, message = "备注的长度需要在150个字之内")
    private String remark;
}
